const routes = [
  {
    path: '/',
    redirect: '/workbench',
  },
  {
    path: '/layout',
    name: 'Layout',
    component: () => import('@/layout/index.vue'),
    children: [
      // 工作台
      {
        path: '/workbench',
        name: 'Workbench',
        meta: {
          title: '工作台',
          icon: 'icon-menu-workbench',
          indexM: '1',
          isShow: true,
        },
        component: () => import('@/view/workbench/index.vue'),
      },

      // 组件列表
      {
        path: '/moduleList',
        name: 'ModuleList',
        meta: {
          title: '组件列表',
          icon: 'icon-menu-moduleList',
          indexM: '2',
          isShow: true,
        },

        // 组件列表-子项列表
        children: [
          {
            path: '/moduleList/tabs',
            name: 'Tabs',
            meta: {
              title: 'Tabs',
              icon: 'icon-menu-tabs',
              indexM: '2-1',
              isShow: true,
            },
            component: () => import('@/view/moduleList/tabs/index.vue'),
            // component: () => import('../view/moduleList/children/tabs/index.vue'),
          },
          // {
          //   path: '/moduleList/button',
          //   name: 'Button',
          //   meta: {
          //     title: 'Button',
          //     icon: 'icon-menu-button',
          //     indexM: '2-2',
          //   },
          //   component: () => import('@/view/moduleList/button/index.vue'),
          //   // component: () => import('../view/moduleList/children/tabs/index.vue'),
          // },
          // {
          //   path: '/moduleList/card',
          //   name: 'Card',
          //   meta: {
          //     title: 'Card',
          //     icon: 'icon-menu-card',
          //     indexM: '2-3'
          //   },
          //   component: () => import('@/view/moduleList/card/index.vue')
          //   // component: () => import('../view/moduleList/children/tabs/index.vue'),
          // }
        ],
      },

      // 函数库
      {
        path: '/functionLibrary',
        name: 'FunctionLibrary',
        meta: {
          title: '函数库',
          icon: 'icon-menu-functionLibrary',
          indexM: '3',
          isShow: true,
        },
        component: () => import('@/view/functionLibrary/index.vue'),
      },

      // 摄影作品
      {
        path: '/photographyWorks',
        name: 'PhotographyWorks',
        meta: {
          title: '摄影作品',
          icon: 'icon-menu-photographyWorks',
          indexM: '4',
          isShow: true,
        },
        component: () => import('@/view/photographyWorks/index.vue'),
      },
      // 摄影作品
      {
        path: '/photoAlbumDetail',
        name: 'PhotoAlbumDetail',
        meta: {
          title: '相册详情',
          icon: 'icon-menu-photographyWorks',
          indexM: '4-1',
          isShow: false,
        },
        component: () =>
          import('@/view/photographyWorks/children/photoAlbumDetail/index.vue'),
      },
      // 系统设置
      {
        path: '/systemSetting',
        name: 'SystemSetting',
        meta: {
          title: '系统设置',
          icon: 'icon-menu-systemSetting',
          indexM: '5',
          isShow: true,
        },
        component: () => import('@/view/systemSetting/index.vue'),
      },
    ],
  },
]

export default routes
